<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>acutil: src/strutil.h文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">acutil</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="namespaces.html"><span>名字空间</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#namespaces">名字空间</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">src/strutil.h文件参考</div>  </div>
</div>
<div class="contents">

<p>字符串相关工具函数  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &lt;list&gt;</code><br/>
<code>#include &lt;string&gt;</code><br/>
<code>#include &lt;vector&gt;</code><br/>
<code>#include &quot;base/platform.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="strutil__inl_8h_source.html">strutil_inl.h</a>&quot;</code><br/>
</div>
<p><a href="strutil_8h_source.html">浏览该文件的源代码。</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="namespaces"></a>
名字空间</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceacutil.html">acutil</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html">acutil::string</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT , typename StringContainer &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">std::basic_string&lt; CharT &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#a42cebc0ae4c28cdb3182e618385cafd5">acutil::string::Join</a> (const StringContainer &amp;string_list, const std::basic_string&lt; CharT &gt; &amp;seperator)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">将<em>string_list</em> 内所有字符串以<em>seperator</em> 为间隔串联起来  <a href="#a42cebc0ae4c28cdb3182e618385cafd5"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">std::basic_string&lt; CharT &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#a2da9dd644aa10e6eb9ae128e4dafc1d7">acutil::string::Lower</a> (const std::basic_string&lt; CharT &gt; &amp;s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">将字符串<em>s</em> 中所有字符按照<em></em>(A-Z)=&gt;(a-z) 的对应关系全部转化为小写  <a href="#a2da9dd644aa10e6eb9ae128e4dafc1d7"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">std::basic_string&lt; CharT &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#ad5709ef2fefc7bed7be85efe434c1b2d">acutil::string::Upper</a> (const std::basic_string&lt; CharT &gt; &amp;s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">将字符串<em>s</em> 中所有字符按照<em></em>(a-z)=&gt;(A-Z) 的对应关系全部转化为大写  <a href="#ad5709ef2fefc7bed7be85efe434c1b2d"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#a305a8e63c81de2b38195f0f7a834737d">acutil::string::ToLower</a> (std::basic_string&lt; CharT &gt; &amp;s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">与 <a class="el" href="namespaceacutil_1_1string.html#a2da9dd644aa10e6eb9ae128e4dafc1d7" title="将字符串s 中所有字符按照(A-Z)=&gt;(a-z) 的对应关系全部转化为小写">Lower()</a> 功能相类似,只是 <a class="el" href="namespaceacutil_1_1string.html#a305a8e63c81de2b38195f0f7a834737d" title="与 Lower() 功能相类似,只是 ToLower() 是对字符串进行原地修改">ToLower()</a> 是对字符串进行原地修改  <a href="#a305a8e63c81de2b38195f0f7a834737d"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#adfc7fa59c511e4c4d795366743142de9">acutil::string::ToUpper</a> (std::basic_string&lt; CharT &gt; &amp;s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">与 <a class="el" href="namespaceacutil_1_1string.html#ad5709ef2fefc7bed7be85efe434c1b2d" title="将字符串s 中所有字符按照(a-z)=&gt;(A-Z) 的对应关系全部转化为大写">Upper()</a> 功能相类似,只是 <a class="el" href="namespaceacutil_1_1string.html#adfc7fa59c511e4c4d795366743142de9" title="与 Upper() 功能相类似,只是 ToUpper() 是对字符串进行原地修改">ToUpper()</a> 是对字符串进行原地修改  <a href="#adfc7fa59c511e4c4d795366743142de9"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#ac59b0baa9f7f7f5e57dad928545252a1">acutil::string::TrimStart</a> (std::basic_string&lt; CharT &gt; &amp;s, const std::basic_string&lt; CharT &gt; &amp;trim_chars)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">删除<em>s</em> 首部多余的字符,多余字符列表由<em>trim_chars</em> 指定  <a href="#ac59b0baa9f7f7f5e57dad928545252a1"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#a40f65b3dbb8410d5b6a92fc9cfea3aef">acutil::string::TrimEnd</a> (std::basic_string&lt; CharT &gt; &amp;s, const std::basic_string&lt; CharT &gt; &amp;trim_chars)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">删除<em>s</em> 尾部多余的字符,多余字符列表由<em>trim_chars</em> 指定  <a href="#a40f65b3dbb8410d5b6a92fc9cfea3aef"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#a4598cbba42dbcfcf5723c7c889d228c1">acutil::string::Trim</a> (std::basic_string&lt; CharT &gt; &amp;s, const std::basic_string&lt; CharT &gt; &amp;trim_chars)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">删除<em>s</em> 首部与尾部多余的字符,多余字符列表由<em>trim_chars</em> 指定  <a href="#a4598cbba42dbcfcf5723c7c889d228c1"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#a6445f70a2e7e028c6bb1f53b85216717">acutil::string::Trim</a> (std::basic_string&lt; CharT &gt; &amp;s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Trim(std::basic_string&lt;CharT&gt;&amp;, const CharT*) 的特殊版本,去除<em>s</em> 首尾所有空白字符  <a href="#a6445f70a2e7e028c6bb1f53b85216717"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT , typename Predicate &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#a9edec33cd15f06c02e89105cd347ed5f">acutil::string::TrimStart_If</a> (std::basic_string&lt; CharT &gt; &amp;s, const Predicate &amp;pred)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">和 Trim_Start() 功能类似,不过是否删除字符是由<em>pred(c)指定的</em>,如果其返回false,则结束Trim过程  <a href="#a9edec33cd15f06c02e89105cd347ed5f"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT , typename Predicate &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#a3e2ddb9574c70c38c91158b6d691efb1">acutil::string::TrimEnd_If</a> (std::basic_string&lt; CharT &gt; &amp;s, const Predicate &amp;pred)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">和 Trim_End() 功能类似,不过是否删除字符是由<em>pred(c)指定的</em>,如果其返回false,则结束Trim过程  <a href="#a3e2ddb9574c70c38c91158b6d691efb1"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename CharT , typename Predicate &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceacutil_1_1string.html#ace2ff30b92333c032d6ff0ede915f4a9">acutil::string::Trim_If</a> (std::basic_string&lt; CharT &gt; &amp;s, const Predicate &amp;pred)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">和 <a class="el" href="namespaceacutil_1_1string.html#a4598cbba42dbcfcf5723c7c889d228c1" title="删除s 首部与尾部多余的字符,多余字符列表由trim_chars 指定">Trim()</a> 功能类似,不过是否删除字符是由<em>pred(c)指定的</em>,如果其返回false,则结束Trim过程  <a href="#ace2ff30b92333c032d6ff0ede915f4a9"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>详细描述</h2>
<div class="textblock"><p>字符串相关工具函数 </p>
<p>字符串相关的工具函数全部放置在这里,但是和国际化相关的函数并不在此 </p>

<p>在文件<a class="el" href="strutil_8h_source.html">strutil.h</a>中定义。</p>
</div></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>名字空间</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2011年四月11日 星期一 00:05:04 for acutil by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
